
interface Constants {
	static public final int MILLIS_PER_TICK = 100;

/**************************************************************************************************/

   //#include ${file.src.device.constants}
   //#endinclude

/**************************************************************************************************/
	public final static int keyNONE        	= 0;
	public final static int keyUP          	= (1 << 0);
	public final static int keyDOWN        	= (1 << 1);
	public final static int keyRIGHT       	= (1 << 2);
	public final static int keyLEFT        	= (1 << 3);
	public final static int keyFIRE        	= (1 << 4);
	public final static int keyNUM0        	= (1 << 5);
	public final static int keyNUM1        	= (1 << 6);
	public final static int keyNUM2        	= (1 << 7);
	public final static int keyNUM3        	= (1 << 8);
	public final static int keyNUM4        	= (1 << 9);
	public final static int keyNUM5        	= (1 << 10);
	public final static int keyNUM6        	= (1 << 11);
	public final static int keyNUM7        	= (1 << 12);
	public final static int keyNUM8        	= (1 << 13);
	public final static int keyNUM9        	= (1 << 14);
	public final static int keySTAR        	= (1 << 15);
	public final static int keyPOUND       	= (1 << 16);
	public final static int keyLEFTSOFT    	= (1 << 17);
	public final static int keyRIGHTSOFT	= (1 << 18);
	public final static int keyANY         	= (1 << 31);

//#include ${file.src.device.keys}
//#endinclude

/**************************************************************************************************/
	// Game state
	static public final byte GAME_STATE_NO_READY       = -1;
	static public final byte GAME_STATE_EDIT_NAME      = 0;
	static public final byte GAME_STATE_ENABLE_SOUND   = 1;
	static public final byte GAME_STATE_SPLASH         = 2;
	static public final byte GAME_STATE_MENU           = 3;
	static public final byte GAME_STATE_LOADING        = 4;
	static public final byte GAME_STATE_START          = 5;
	static public final byte GAME_STATE_IN_GAME_MENU   = 6;
	static public final byte GAME_STATE_FINAL_SCENE    = 7;
	static public final byte GAME_STATE_UPLOAD_SCORE   = 8;
	static public final byte GAME_STATE_GET_READY      = 9;
	static public final byte GAME_STATE_NEW_GAME       = 10;
	//#if USE_GAME_TIPS
		static public final byte GAME_STATE_SHOW_TIP       = 11;
	//#endif

	static public final byte GAME_STATE_EXIT           = 99;
	static public final byte GAME_STATE_LOGO           = 100;

/**************************************************************************************************/
	//#if USE_GAME_TIPS
		public static final byte TIP_LEVEL             = 0;
		public static final byte TIP_SPRING            = 1;
		public static final byte TIP_FIREWALL          = 2;
		public static final byte TIP_DYNAMITE          = 3;
		public static final byte TIP_PICKAXE           = 4;
		public static final byte TIP_CRASHING_PLATFORM = 5;
		public static final byte TIP_TELEPORT          = 6;
		public static final byte TIP_COUNT             = 7;

		public static final byte TIP_START_DISTANCE    = 40;
	//#endif

/**************************************************************************************************/   
	static public final byte ANIMATION_CANNON       = 0;
	static public final byte ANIMATION_CANNON_FIRE  = 1;
	static public final byte ANIMATION_CANNON_CLIMB = 2;

	static public final byte ANIMATION_FIREWALL_START_FINISH = 0;
	static public final byte ANIMATION_FIREWALL              = 1;
	static public final byte ANIMATION_FIREWALL_IDLE         = 2;

	static public final byte DIRECTION_FLY_NONE  = 0;
	static public final byte DIRECTION_FLY_LEFT  = (1 << 0);
	static public final byte DIRECTION_FLY_RIGHT = (1 << 1);
	static public final byte DIRECTION_FLY_UP    = (1 << 2);
	static public final byte DIRECTION_FLY_DOWN  = (1 << 3);

	static public final byte TRANSPORTER_STATE_WAIT = 0;
	static public final byte TRANSPORTER_STATE_MOVE = 1;
   
	static public final short TRANSPORTER_WAIT_TICKS = 50;

	static public final byte TRANSPORTER_STEP_X = 4;
	static public final byte TRANSPORTER_STEP_Y = 4;

	static public final int SLIDE_SPEED = 12;
   
	static public final int CRASHING_PLATFORM_STEP_INC = 4;

	static public final int CRASHING_PLATFORM_STEP_DIV = 2;

	static public final byte CRASHING_PLATFORM_STATE_WAIT      = 0;
	static public final byte CRASHING_PLATFORM_STATE_MARV_STEP = 1;
	static public final byte CRASHING_PLATFORM_STATE_FALL      = 2;
	static public final byte CRASHING_PLATFORM_STATE_SLOW_DOWN = 3;
	static public final byte CRASHING_PLATFORM_STATE_CLIMB     = 4;

	static public final short CRASHING_PLATFORM_WAIT_TICKS = 0;

	static public final byte PLATFORM_UP = 0;
	static public final byte PLATFORM_DOWN = 1;

	public static final byte LAYERPROPERTY_PIC_INDEX = 0;
	public static final byte LAYERPROPERTY_OFFSET_X  = 1;
	public static final byte LAYERPROPERTY_OFFSET_Y  = 2;
	public static final byte LAYERPROPERTY_VISIBLE   = 3;

	static public short[] TELEPORT_PIC_INDEX = {PicID.nPicID_1t, PicID.nPicID_2t, PicID.nPicID_3t, PicID.nPicID_4t};

/**************************************************************************************************/
/**                                         SCORES                                               **/
/**************************************************************************************************/
	/** Mortal Fly */
	public static final short SCORE_MORTALFLY    = 50;
	/** Jumping Beast */
	public static final short SCORE_JUMPINGBEAST = 100;
	/** Slime */
	public static final short SCORE_SLIME        = 150;

	/** Green diamond */
	public static final short SCORE_DIAMOND_1    = 50;
	/** Yellow diamond */
	public static final short SCORE_DIAMOND_2    = 75;
	/** Red diamond */
	public static final short SCORE_DIAMOND_3    = 100;
	/** Blue diamond */
	public static final short SCORE_DIAMOND_4    = 125;
	/** Gray diamond */
	public static final short SCORE_DIAMOND_5    = 200;

	/** Platform */
	public static final short SCORE_PLATFORM     = 15;

/**************************************************************************************************/
/**                                 ANIMATION DEFINITION                                         **/
/**************************************************************************************************/
   
	/** Mortal Fly */
	public static final byte TYPE_MORTALFLY    = 0;
	/** Jumping Beast */
	public static final byte TYPE_JUMPINGBEAST = 1;
	/** Slime */
	public static final byte TYPE_SLIME        = 2;


 

	static final byte ANIMATION_DRAGON_MOVE_LEFT    = 0;
	static final byte ANIMATION_DRAGON_MOVE_RIGHT   = 1;
	static final byte ANIMATION_DRAGON_ATTACK_LEFT  = 2;
	static final byte ANIMATION_DRAGON_ATTACK_RIGHT = 3;
	static final byte ANIMATION_DRAGON_DEATH        = 4;
	static final byte ANIMATION_DRAGON_TURN         = 5;
	static byte[] ANIMATION_DRAGON = {
										AnimID.AnimID_MonsterDragon, 
										AnimID.AnimID_MonsterDragonRight, 
										AnimID.AnimID_MonsterDragonAttackLeft,
										AnimID.AnimID_MonsterDragonAttackRight,
										AnimID.AnimID_Death,
										AnimID.AnimID_MonsterDragonTurn, 
                                     };

	static final byte ANIMATION_BEAST_MOVE_LEFT  = 0;
	static final byte ANIMATION_BEAST_MOVE_RIGHT = 1;
	static final byte ANIMATION_BEAST_IDLE_LEFT  = 2;
	static final byte ANIMATION_BEAST_IDLE_RIGHT = 3;
	static final byte ANIMATION_BEAST_DEATH      = 4;
	static final byte ANIMATION_BEAST_TURN       = 5;
	static byte[] ANIMATION_BEAST = {   AnimID.AnimID_MonsterBeast, 
										AnimID.AnimID_MonsterBeastRight, 
										AnimID.AnimID_MonsterBeastIdleLeft,
										AnimID.AnimID_MonsterBeastIdleRight,
										AnimID.AnimID_Death,
										AnimID.AnimID_MonsterBeastTurn,
									};

	static final byte ANIMATION_SLIME_MOVE_LEFT        = 0;
	static final byte ANIMATION_SLIME_MOVE_RIGHT       = 1;
	static final byte ANIMATION_SLIME_START_FALL_DOWN  = 2;
	static final byte ANIMATION_SLIME_FALL_DOWN        = 3;
	static final byte ANIMATION_SLIME_FLOOR_TOUCH      = 4;
	static final byte ANIMATION_SLIME_DEATH            = 5;
	static byte[] ANIMATION_SLIME = {   AnimID.AnimID_MonsterDrop, 
										AnimID.AnimID_MonsterDropRight, 
										AnimID.AnimID_MonsterDropStartDrop,
										AnimID.AnimID_MonsterDropDrop, 
										AnimID.AnimID_MonsterDropFloor,
										AnimID.AnimID_Death,
									};

/**************************************************************************************************/
/**                                          SOUND                                               **/
/**************************************************************************************************/
	//#if SOUND_NOKIA_RT || SOUND_MMAPI || SAMSUNG_MMF || SHARP_MMF
		public static final byte SOUND_BONUS       = 0; // MTM_bonus.mid
		public static final byte SOUND_DIE         = 1; // MTM_die.mid
		public static final byte SOUND_KILL        = 2; // MTM_kill.mid
		public static final byte SOUND_LVL_CLEAR   = 3; // MTM_lvl_clear.mid
		public static final byte SOUND_NEW_LIFE    = 4; // MTM_new_life.mid
		public static final byte SOUND_THEME       = 5; // MTM_theme.mid
		public static final byte SOUND_TIMEWARNING = 6; // MTM_timewarning.mid
		public static final byte SOUND_COUNT       = 7;
	//#endif
}
